<template>
    <view class="container bh-justify-space-between" >
        <view class="tab-li" v-for="(item,index) in list" :key="index" @click="totar(item.pagePath)">
			<image :src="index == currentTabIndex ? item.selectedIconPath : item.iconPath" mode=""></image>
        	<view class="">{{item.text}}</view>
        </view>
    </view>
</template>
<script>
export default {
    name: 'BhTabbarfooter',
    emits: ['changeTab'],
    props: {
        current: {
        	type: [Number, String],
        	default: 0
        },
       
    },
    data(){
        return {
			currentTabIndex: this.current,
            list: [
            		{
            			"pagePath": "/pages/index/index",
            			"iconPath": "../../static/images/home_index1.png",
            			"selectedIconPath": "../../static/images/home_index.png",
            			"text": "首页"
            		},
            		{
            			"pagePath": "/pages/post/index",
            			"iconPath": "../../static/images/zhuandian.png",
            			"selectedIconPath": "../../static/images/zhuandian1.png",
            			"text": "转店"
            		},
					{
						"pagePath": "/pages/post/index",
						"iconPath": "../../static/images/home_add.png",
						"selectedIconPath": "../../static/images/home_add.png",
						"text": "劳务市场"
					},
					{
						"pagePath": "/pages/post/index",
						"iconPath": "../../static/images/xiaoxi.png",
						"selectedIconPath": "../../static/images/xiaoxi1.png",
						"text": "消息"
					},
            		{
            			"pagePath": "/pages/personal/index",
            			"iconPath": "../../static/images/home_my1.png",
            			"selectedIconPath": "../../static/images/home_my.png",
            			"text": "我的"
            		}
            	]
        }
    },
    methods: {
        totar(path){
			uni.reLaunch({
				url: path,
			});
		}
    },
    
}
</script>
<style scoped lang="scss">
	@import url(../../static/css/base.css);
.container{
	/* 蒙版 */
	
	position: fixed;
	box-sizing: border-box;
	left: 0;
	bottom: 0;
	width: 100vw;
	height: 162rpx;
	background: url(../../static/images/footerBg.png) left top;
	background-size: 100%;
	opacity: 1;
	z-index: 2;
	padding: 20rpx 80rpx;
	display: flex;
	.tab-li{
		height: 100rpx;
		text-align: center;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: flex-end;
		font-size: 24rpx;
		view{
			margin-top: 10rpx;
		}
		&:nth-child(3){
			position: relative;
			image{
				width: 102rpx;
				height: 102rpx;
				position: absolute;
				top: -40rpx;
				left: -5rpx;
				
			}
		}
	}
	image{
		width: 48rpx;
		height: 48rpx;
	}
}
</style>